#include <bits/stdc++.h>
using namespace std;
int A[1000010], B[1000010];
int M[1000010] = {0};
int main()
{
    int yy = 0, y = 0;
    freopen("input.in", "r", stdin);
    freopen("output.out", "w", stdout);
    int n, k;
    cin >> n >> k;
    for (int i = 1; i <= k; i++)
    {
        int p, x;
        cin >> p >> x;
        A[p - 1] = x;
    }
    int wil = A[0] = B[0] = 1;
    M[1] = 0;
    for (int i = 1; i < n; i++)
        if (A[i] == 0)
            A[i] = A[i - 1] + 1;
    for (int i = 1; i < n; i++)
    {
        if (A[i])
            if (yy == 0 && y == 0)
            {
                yy = i + 1;
                y = A[i];
            }
            else
            {
                if (i + 1 - yy < A[i] - y || yy < y)
                {
                    cout << -1 << endl;
                    return 0;
                }
                yy = i + 1;
                y = A[i];
            }
        if (A[i] <= A[i - 1])
        {
            B[M[A[i]]]++;
            B[i] = M[A[i]] - wil;
            wil = M[A[i]] + 1;
        }
        else
        {
            B[i] = i + 1 - wil;
            M[A[i]] = i;
            wil = i + 1;
        }
    }
    cout << (wil = B[0]) << ' ';
    for (int i = 1; i < n; i++)
        cout << (wil += B[i]) << ' ';
    cout << endl;
    return 0;
}